#ifndef CLIENT_H
#define CLIENT_H
#ifdef _WIN32
#include <winsock2.h>
#pragma comment(lib,"Ws2_32.lib")
#endif
#ifdef linux
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#endif
#include <iostream>
#include <string>
#include <memory.h>
#include "data.h"
using namespace std;
class client
{
protected :
    unsigned int port;//port server
    unsigned int cl;//client socket
    char serverip[32];
    struct sockaddr_in server;
    data sen;
    data rec;
    //khoi tao winsock
    int clientinit();
    int clientcreatesocket();
    int clientconnect();
    int clientsend();
    int clientrecv();
    void clientclose();
    void clientcleanup();
    void clientgetparameters();
    client();
    ~client();
};
#endif // CLIENT_H
